﻿namespace Viz
{
    using System;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Ink;
    using System.Windows.Input;
    using System.Windows.Shapes;
    using Microsoft.Xna.Framework.Graphics;
    using Microsoft.Xna.Framework;

    public class TextDrawInfo
    {
        public VertexPositionTexture[]              Vertices;
        public Texture2D                            Texture;
    }

    public class TextCreateInfo
    {
        public string                               Text;
        public Color                                Foreground;
        public Color                                Background;
        public int                                  Size;
        public string                               FontName;

        public override int GetHashCode()
        {
            return Text.GetHashCode() ^ 
                   Foreground.GetHashCode() ^
                   Background.GetHashCode() ^
                   Size.GetHashCode() ^
                   FontName.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            return ((obj as TextCreateInfo) == this);
        }

        public static bool operator ==(TextCreateInfo l, TextCreateInfo r)
        {
            return (l.Text == r.Text &&
                   l.Foreground == r.Foreground &&
                   l.Background == r.Background &&
                   l.Size == r.Size &&
                   l.FontName == r.FontName);
        }

        public static bool operator !=(TextCreateInfo l, TextCreateInfo r)
        {
            return !(r == l);
        }
    }
}
